home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-0143 / articles / gfa2.doc < prev    next >
Text File  |  1997-04-16  |  3KB  |  107 lines

  1.  
  2.  
  3.                        -------------------
  4.                        GFA TUTORIAL PART 2
  5.                        -------------------
  6.                                         Written by Paul Bramwell
  7.      
  8.  
  9. Welcome to the GFA Tutorial, elsewhere in the menus you will find 
  10. part one which told you how to correct the colours for GFA Basic 
  11. 2.  This part will tell you a few commands and useful hinters.
  12.  
  13.  
  14.                              SCREENS
  15.                              -------
  16.  
  17.  
  18.                     Loading a picture:
  19.                     ------------------
  20.  
  21. DEGAS ELITE
  22.  
  23. Bload "picture.pi1",Xbios(3)-34         Load pic in memory
  24. Void Xbios(6,L:Xbios(3)-32)             Corrects palette
  25.  
  26. The above is the same for medium and high resolution screens too.
  27.  
  28. GFA FORMAT
  29.  
  30. Bload "picture.pi1",32000
  31. Void Xbios(6,L:32000)
  32.  
  33.  
  34.                         Saving a picture:
  35.                         -----------------
  36.  
  37. Use the following program:
  38.  
  39. DIM reg%(15)            ! Leave room fo 15 registers
  40. Res%=MKI$(Xbios(4))     ! Current resolution as a string
  41. SGET scr$               ! Get Screen as a string
  42. For r%=0 to 15
  43.  reg%(r%)=Xbios(7,r%,-1) AND &H777  ! Get the registers contents
  44.  palette$=palette$+MKI$(reg%(r%))   ! Throw it into a string
  45. Next r%
  46. f$=res%+palette$+scr$   ! Puts them all together
  47. BSAVE "picture.pic",VARPTR(f$),32034 ! Save piccy
  48.  
  49.  
  50.                           Void Commands
  51.                           -------------
  52.  
  53. A useful expression when entering text:
  54.  
  55. Void Xbios(11,Bios(11,-1)OR &H10)  ! On
  56. Void Bios(11,Bios(11,-1)AND &HEF)  ! Off
  57.  
  58. Void inp(2) ! Waits for a keypress, ignoring input
  59.  
  60.  
  61.                           Machine Code
  62.                           ------------
  63.  
  64. Supposing you have got your .prg file, say musix, you can either 
  65. do this:
  66.  
  67. Dim Biffer%(Length/4)                  ! Store room for it
  68. Bload "MUSIC1.PRG",varptyr(biffer%(0)) ! Load it in
  69. '
  70. M%=varptr(biffer%(0))                  ! Call it back
  71. Void C:m%()
  72.   
  73. Or alternatively
  74.  
  75. Reserve Fre(0)-10000                   ! Reserve some memory 
  76. Exec 0,"Machine.Prg","",""             ! Load it in and go
  77. Reserve Fre(0)+10000-250               ! After, get memory back
  78.  
  79.  
  80.                       Disabling that Mouse
  81.                       --------------------
  82.  
  83. Out 4,18       ! Disable Mouse
  84. Out 4,8        ! Enable it
  85.  
  86.  
  87.                          Supervisor Mode
  88.                          ---------------
  89.  
  90. As in machine code, to get full attention for your program:
  91.  
  92. Supervisor%=Gemdos(32,L:0) ! On
  93. ~GEMDOS(32,L:supervisor%)  ! Off
  94.  
  95.  
  96.                             Thats IT!
  97.                             ---------
  98.  
  99.  
  100. Thats it for this issue, next issue (if possible) we will show 
  101. you BMOVE, PUT, and GET and how to draw some BOXES and ALERTS!
  102.  
  103.  
  104.  
  105.  
  106.  
  107.